package com.woniu.payback_font.mapper;


import com.github.pagehelper.PageInfo;
import com.woniu.payback_font.entity.Permission;
import com.woniu.payback_font.vo.PermissionMenuVo;
import io.swagger.annotations.Api;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Api(value = "权限表mapper接口")
public interface PermissionMapper {
    int deleteByPrimaryKey(Integer pId);

    int insert(Permission record);

    Permission selectByPrimaryKey(Integer pId);

    List<Permission> selectAll();

    int updateByPrimaryKey(Permission record);

    PageInfo<Permission> findPerByPage(@Param("pName") String pName);


    /**
     *权限树查询封装语句（查询所有，测试）
     * @return
     */
    List<PermissionMenuVo> findPermissionMenus();

}